//Kiosk 64
//Version IR#
//(C) Night-Eagle 2007

AddCSLuaFile("cl_init.lua")
AddCSLuaFile("shared.lua")
AddCSLuaFile("cl_hack.lua")

include('shared.lua')

function ENT:SpawnFunction(pl,tr)
	if (!tr.Hit) then
		return
	end
	
	local ent = ents.Create("computer64")
	ent:SetPos(tr.HitPos+(45*tr.HitNormal))
	ent:Spawn()
	ent:Activate()
	
	ent:GetTable().master = ply
	
	return ent
end

function ENT:OnRemove()
end

function ENT:Initialize()
	self.Entity:SetModel("models/props/cs_office/computer_monitor.mdl")
	self.Entity:PhysicsInit(SOLID_VPHYSICS)
	self.Entity:SetMoveType(MOVETYPE_VPHYSICS)
	self.Entity:SetSolid(SOLID_VPHYSICS)
	
	self.hackE = CurTime()
	
	local phys = self.Entity:GetPhysicsObject()
	if (phys:IsValid()) then
		phys:EnableMotion(false)
	end
end

function ENT:Use(activator,caller)
	if (not activator:IsPlayer()) or self.hackE > CurTime() then
		return
	end
	
	umsg.Start("hackE",activator)
	umsg.End()
	
	self.hackE = CurTime()+1
end

function ENT:Think()
end









































